//
//  MyTabBarViewController.m
//  XiMaLaYa
//
//  Created by 刘喆 on 2018/1/25.
//  Copyright © 2018年 com，baweijiaoyu. All rights reserved.
//

#import "MyTabBarViewController.h"
#import "FirstpageViewController.h"
#import "ListenViewController.h"
#import "FindViewController.h"
#import "MyViewController.h"
@interface MyTabBarViewController ()

@end

@implementation MyTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // 创建主页面
    FirstpageViewController *firstVC = [[FirstpageViewController alloc] init];
    ListenViewController *listenVC = [[ListenViewController alloc] init];
    
    FindViewController *findVC = [[FindViewController alloc] init];
    MyViewController *myVC = [[MyViewController alloc] init];
    

    
    // 包装导航控制器
    UINavigationController *firstNav = [[UINavigationController alloc] initWithRootViewController:firstVC];
    UINavigationController *listenNav = [[UINavigationController alloc] initWithRootViewController:listenVC];
    UINavigationController *findNav = [[UINavigationController alloc] initWithRootViewController:findVC];
    UINavigationController *myNav = [[UINavigationController alloc] initWithRootViewController:myVC];
    
    // 创建标签按钮
    firstNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"首页" image:[[UIImage imageNamed:@"shouye_m"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:@"shouye_h"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    listenNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"周边" image:[[UIImage imageNamed:@"mylisten_m"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:@"mylisten_h"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    findNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"订单" image:[[UIImage imageNamed:@"find_m"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:@"find_h"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    myNav.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我的" image:[[UIImage imageNamed:@"my_m"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] selectedImage:[[UIImage imageNamed:@"my_h"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    
    // 将标签按钮添加到标签控制器上
    self.viewControllers = @[firstNav, listenNav, findNav, myNav];
    // 设置标签控件的颜色
    self.tabBar.tintColor = [UIColor colorWithRed:(252/255.0) green:(89/255.0) blue:(60/255.0) alpha:1.0];
    self.tabBar.barTintColor = [UIColor whiteColor];
    
    
    
//    李充信
//    欠了3。5个亿
//    带着他的小姨子跑了
//    现在我们没有办法。拿着钱包抵工资
//    原价只要100多。200多的钱包。
//    现在只要20块。。
//    统统只要20块。
//    20块你买不了吃亏。20块。你买不了上当。20块你啥都买不了。
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
